]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Include a non-fake Config
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 12 Jul 2023 14:46:29 +0000 (16:46 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 13 Jul 2023 15:33:06 +0000 (15:33 +0000)
We currently include a fake config.js file to satisfy the indirect
import from ExtensionUtils. However we're about to need to pass
build-time information into the program ourselves, so generate
a proper file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2841>

subprojects/extensions-app/js/meson.build
subprojects/extensions-app/js/misc/config.js [deleted file]
subprojects/extensions-app/js/misc/config.js.in [new file with mode: 0644]
subprojects/extensions-app/js/misc/meson.build [new file with mode: 0644]

index ce2a7768b7245b9525272f80d8d4cc6636b126b5..c9a67f8d739d561f02f04b7308b686e4fed5c15f 100644 (file)
@@ -26,6 +26,8 @@ configure_file(
   install_dir: pkgdatadir,
 )
 
+subdir('misc')
+
 gnome.compile_resources(
   app_id + '.src',
   configure_file(
@@ -33,7 +35,7 @@ gnome.compile_resources(
     output: app_id + '.src.gresource.xml',
     configuration: {'profile': '/'.join(profile.split('.')) },
   ),
-  source_dir: ['.', '../../../js'],
+  source_dir: ['.', meson.current_build_dir(), '../../../js'],
   gresource_bundle: true,
   install: true,
   install_dir: pkgdatadir
diff --git a/subprojects/extensions-app/js/misc/config.js b/subprojects/extensions-app/js/misc/config.js
deleted file mode 100644 (file)
index d213b78..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* Fake module to satify import in ExtensionUtils */
diff --git a/subprojects/extensions-app/js/misc/config.js.in b/subprojects/extensions-app/js/misc/config.js.in
new file mode 100644 (file)
index 0000000..4350f83
--- /dev/null
@@ -0,0 +1 @@
+var PACKAGE_VERSION = '@PACKAGE_VERSION@';
diff --git a/subprojects/extensions-app/js/misc/meson.build b/subprojects/extensions-app/js/misc/meson.build
new file mode 100644 (file)
index 0000000..85652ee
--- /dev/null
@@ -0,0 +1,7 @@
+config_js = configure_file(
+  input: 'config.js.in',
+  output: '@BASENAME@',
+  configuration: {
+    'GETTEXT_VERSION': meson.project_version(),
+  }
+)